home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
L' Effet Pommier 3
/
L'Effet Pommier - Volume 03.iso
/
Programmation
/
Gooey1.3.1
/
C Templates
/
ModelessDialog.c
< prev
next >
Wrap
Text File
|
1994-04-14
|
7KB
|
245 lines
$$Loop ModelessDialogs
$$Message User Modeless Dialog, u:$Worksheet.name$.h
$$File u:$Worksheet.name$.h
/* $Worksheet.name$ Handle this dialog */
/* $CopyRight$ */
/* File name: $Worksheet.name$.h
Function: Handle this modeless dialog.
This dialog is called when:
History: $Date$ Original by $Author$
*/
/* ======================================================= */
/* ======================================================= */
#ifdef __cplusplus
extern "C" {
#endif
/* Init the modeless dialog */
void U_Init_$Worksheet.name$(void);
/* Moved the modeless dialog */
void U_Moved_$Worksheet.name$(DialogPtr theDialog, Rect *OldRect);
/* Update the modeless dialog */
void U_Update_$Worksheet.name$(DialogPtr theDialog);
/* Setup the modeless dialog */
void U_Setup_$Worksheet.name$(DialogPtr theDialog);
/* Close the modeless dialog */
void U_Close_$Worksheet.name$(DialogPtr theDialog);
/* Hit in the modeless dialog */
void U_Hit_$Worksheet.name$(DialogPtr theDialog, short *itemHit, Boolean *ExitDialog, EventRecord *theEvent);
#ifdef __cplusplus
}
#endif
/* ======================================================= */
/* ======================================================= */
$$CloseFile
$$Message User Modeless Dialog, u:$Worksheet.name$.c
$$File u:$Worksheet.name$.c
/* $Worksheet.name$ Handle this dialog */
/* $CopyRight$ */
/* File name: $Worksheet.name$.h
Function: Handle this modeless dialog.
This dialog is called when:
History: $Date$ Original by $Author$
*/
#include "mmCommon$Prototype.name$.h" /* Common */
#include "Common$Prototype.name$.h" /* Common */
#include "$Worksheet.name$.h"
/* ======================================================= */
/* ======================================================= */
/* Routine: U_Init_$Worksheet.name$ */
/* Purpose: This routine is called while when the program is first run */
/* This is used for onetime initialization */
void U_Init_$Worksheet.name$(void)
{
}
/* ======================================================= */
/* Routine: U_Moved_$Worksheet.name$ */
/* Purpose: This routine is called when our window gets moved on the screen, */
/* or to another screen */
void U_Moved_$Worksheet.name$(DialogPtr theDialog,Rect *OldRect)
{
}
/* ======================================================= */
/* Routine: U_Update_$Worksheet.name$ */
/* Purpose: This routine is called when our window gets an update event */
void U_Update_$Worksheet.name$(DialogPtr theDialog)
{
}
/* ======================================================= */
/* Routine: U_Setup_$Worksheet.name$ */
/* Purpose: This routine is called when our modeless dialog is opened */
void U_Setup_$Worksheet.name$(DialogPtr theDialog)
{
}
/* ======================================================= */
/* Routine: U_Close_$Worksheet.name$ */
/* Purpose: This routine is called when our modeless dialog is closed */
void U_Close_$Worksheet.name$(DialogPtr theDialog)
{
}
/* ======================================================= */
/* Routine: U_Hit_$Worksheet.name$ */
/* Purpose: Hit in the modeless dialog */
void U_Hit_$Worksheet.name$(DialogPtr theDialog,short *itemHit,Boolean *ExitDialog,EventRecord *theEvent)
{
short DType; /* Type of dialog item */
Handle DItem; /* Handle to the dialog item */
ControlHandle CItem; /* Control handle */
short theSelection; /* Palette selection */
$$Loop Control.type = Button
$$if Control.Default
/* This is the default selection, when RETURN is pressed. */
$$endif
if (*itemHit == ResD_$Control.name$) /* Handle the Button, $Control.FullName$, being pressed */
{
}
$$EndLoop Control.type
$$Loop Control.type = Checkbox
if (*itemHit == ResD_$Control.name$) /* Handle the checkbox, $Control.FullName$, being pressed */
{
}
$$EndLoop
$$Loop Control.type = Radio
if (*itemHit == ResD_$Control.name$) /* Handle the radio, $Control.FullName$, being pressed */
{
}
$$EndLoop
$$Loop Control.type = Icon
$$if Control.NonGraphic
if (*itemHit == ResD_$Control.name$) /* Handle the Icon, $Control.FullName$, being pressed */
{
}
$$endif Control.NonGraphic
$$EndLoop
$$Loop Control.type = Picture
$$if Control.NonGraphic
if (*itemHit == ResD_$Control.name$) /* Handle the Picture, $Control.FullName$, being pressed */
{
}
$$endif Control.NonGraphic
$$EndLoop
$$Loop Control.type = UButton
if (*itemHit == ResD_$Control.name$) /* Handle the user plugin button, $Control.FullName$, being pressed */
{
}
$$EndLoop
$$Loop Control.type = UToggle
if (*itemHit == ResD_$Control.name$) /* Handle the user plugin toggle, $Control.FullName$, being pressed */
{
}
$$EndLoop
$$Loop Control.type = HotRect
$$if Control.HotSpot
if (*itemHit == ResD_$Control.name$) /* Handle the HotSpot, $Control.FullName$, being pressed */
{
}
$$endif Control.HotSpot
$$EndLoop
$$Loop Control.type = Sicn
$$if Control.NonGraphic
if (*itemHit == ResD_$Control.name$) /* Handle the Sicn, $Control.FullName$, being pressed */
{
}
$$endif Control.NonGraphic
$$EndLoop
$$Loop Control.type = Popup
if (*itemHit == ResD_$Control.name$) /* Handle the Popup, $Control.FullName$, being pressed */
{
GetDItem(theDialog,ResD_$Control.name$,&DType,&DItem,&tempRect);/* Get item information */
CItem = (ControlHandle)DItem;
theSelection = GetCtlValue (CItem); /* Get the Popup selection */
switch (theSelection) /* Select correct item */
{
$$Loop PopupItems
case $Control.PopupID$: /* for $Control.PopupName$ */
break;
$$EndLoop
default: /* allow other buttons, trap for debug */
break; /* end of otherwise */
} /* end of switch */
}
$$EndLoop
$$Loop Control.type = Palette
if (*itemHit == ResD_$Control.name$) /* Handle the Palette, $Control.FullName$, being pressed */
{
GetDItem(theDialog,ResD_$Control.name$,&DType,&DItem,&tempRect);/* Get item information */
CItem = (ControlHandle)DItem;
theSelection = GetCtlValue (CItem); /* Get the Palette selection */
switch (theSelection) /* Select correct item */
{
$$Loop PaletteItems
case $Control.PaletteID$: /* Row $Control.Row$, Column $Control.Column$ */
break;
$$EndLoop
default: /* allow other buttons, trap for debug */
break; /* end of otherwise */
} /* end of switch */
}
$$EndLoop
}
/* ======================================================= */
/* ======================================================= */
$$CloseFile
$$EndLoop